Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contacts: ensure full deletion in +do-edit #302

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

Fang-
Copy link
Member

@Fang- Fang- commented Dec 13, 2024

This was repeatedly deleting from the outer value, instead of the accumulator intended to replace it.

This would result in only a single key being deleted, even if an edit specified multiple keys for deletion.

Probable root-cause of the values that caused the crash described in tloncorp/tlon-apps#4281. I think the change there (on how it does the typechecks) is still good, since the types technically allow the null case, but also don't expect to strictly need it once this is behaving as intended.

This was repeatedly deleting from the outer value, instead of the accumulator intended to replace it.

This would result in only a single key being deleted, even if an edit specified multiple keys for deletion.
@Fang- Fang- requested a review from mikolajpp December 13, 2024 14:09
@Fang-
Copy link
Member Author

Fang- commented Dec 13, 2024

If there's null values in the state, json conversions will also crash:

++ value
|= val=value:c
^- json
?- -.val

@mikolajpp
Copy link
Collaborator

looks good, thanks for finding this.

@mikolajpp mikolajpp merged commit 70b9260 into develop Dec 19, 2024
1 check passed
@mikolajpp mikolajpp deleted the m/contacts-delete-fields branch December 19, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants